package ynu.edu.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import ynu.edu.filter.SimpleAuthFilter;

/**
 * 过滤器配置类
 * 显式配置GlobalFilter以确保正确加载
 */
@Configuration
public class FilterConfig {

    /**
     * 显式注册SimpleAuthFilter
     * 解决@Component注解可能不被识别的问题
     */
    @Bean
    public SimpleAuthFilter simpleAuthFilter() {
        System.out.println("🔧 FilterConfig: 显式创建SimpleAuthFilter Bean");
        return new SimpleAuthFilter();
    }
} 